package com.github.lyd.admin.provider.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.github.lyd.admin.provider.dao.WxUserInfoDao;
import com.github.lyd.admin.provider.entity.WxUserInfoEntity;
import com.github.lyd.admin.provider.service.WxUserInfoService;
import com.github.lyd.admin.provider.utils.PageUtils;
import com.github.lyd.admin.provider.utils.Query;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("wxUserInfoService")
public class WxUserInfoServiceImpl extends ServiceImpl<WxUserInfoDao, WxUserInfoEntity> implements WxUserInfoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<WxUserInfoEntity> page = this.selectPage(
                new Query<WxUserInfoEntity>(params).getPage(),
                new EntityWrapper<WxUserInfoEntity>()
        );

        return new PageUtils(page);
    }

    public void insertWxUserInfo(WxUserInfoEntity wxUserInfoEntity){
        baseMapper.insertWxUserInfo(wxUserInfoEntity);
    }
}
